package com.micro.trace.log.bean;

/**
 * 日志格式化
 */
public class LogBean {

    private final Integer status;

    private final String title;

    private final String url;

    private final String method;

    private final String ip;

    private final String params;

    private final String body;

    private final String reqSize;

    private final String resp;

    private final String respSize;

    private final String consumingTime;

    public LogBean(
            Integer status
            , String title
            , String url
            , String method
            , String ip
            , String reqParam
            , String reqBody
            , String reqSize
            , String resp
            , String respSize
            , String consumingTime) {
        this.status = status;
        this.title = title;
        this.url = url;
        this.method = method;
        this.ip = ip;
        this.params = reqParam;
        this.body = reqBody;
        this.reqSize = reqSize;
        this.resp = resp;
        this.respSize = respSize;
        this.consumingTime = consumingTime;
    }

    public Integer getStatus() {
        return status;
    }

    public String getTitle() {
        return title;
    }

    public String getUrl() {
        return url;
    }

    public String getMethod() {
        return method;
    }

    public String getIp() {
        return ip;
    }

    public String getParams() {
        return params;
    }

    public String getBody() {
        return body;
    }

    public String getReqSize() {
        return reqSize;
    }

    public String getResp() {
        return resp;
    }

    public String getRespSize() {
        return respSize;
    }

    public String getConsumingTime() {
        return consumingTime;
    }

    @Override
    public String toString() {
        return "{" +
                "status:" + status +
                ", title:'" + title + '\'' +
                ", url:'" + url + '\'' +
                ", method:'" + method + '\'' +
                ", ip:'" + ip + '\'' +
                ", params:'" + params + '\'' +
                ", body:'" + body + '\'' +
                ", reqSize:'" + reqSize + '\'' +
                ", resp:'" + resp + '\'' +
                ", respSize:'" + respSize + '\'' +
                ", consumingTime:'" + consumingTime + '\'' +
                '}';
    }
}
